﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.Serialization;
using System.Text;

namespace Nsf.Samples.RetryActivitySample.Infrastructure.Common.FaultDetails
{
    [DataContract]
    public class ValidationFaultDetailsItem
    {

        [DataMember]
        public String Code { get; set; }

        [DataMember]
        public String Description { get; set; }

        public override String ToString()
        {
            return String.Format("Ошибка валидации. Код: {0}. Описание: {1}", Code, Description);
        }

        public ValidationFaultDetailsItem()
        {

        }

        public ValidationFaultDetailsItem(String code, String description)
        {
            Code = code;
            Description = description;
        }

    }
}
